package com.lin.repository;


import com.lin.dataobject.SellerInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 2017-07-23 23:04
 */
public interface SellerInfoRepository extends JpaRepository<SellerInfo, String> {

    SellerInfo findByUsernameAndPassword(String userName,String password);

    List<SellerInfo> findAll(Specification<SellerInfo> spec);

    Page<SellerInfo> findAll(Specification<SellerInfo> spec, Pageable pageable);

    SellerInfo findBySellerId(String sellerId);

    Long count(Specification<SellerInfo> spec);

    SellerInfo findByUsername(String username);
}
